package com.hnn.controller;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.flow.LiteflowResponse;
import com.yomahub.liteflow.slot.DefaultContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hnn
 * @version 1.0
 * @date 2025-06-09 14:21
 */
@RestController
public class TestLiteFlowController {

    @Autowired
    private FlowExecutor flowExecutor;

    @RequestMapping("/testLiteFlow")
    public String testLiteFlow() {
        LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg", DefaultContext.class);

        return "hello world";
    }
}
